<template>
    <div>
		<ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="news in newList" :key="news.id">
					<router-link class="" :to="'/home/newsinfo/'+news.id">
						<img class="mui-media-object mui-pull-left" src="../../assets/images/tx1.png">
						<div class="mui-media-body newlist">
							<p class="mui-ellipsis newp">{{news.comments[0].content}}</p>
                            <p class="newp2"><span>发表时间 : {{news.comments[0].date}}</span><span>出处 : {{news.comments[0].rating}}</span></p>
							<!-- news.pubdate|dataformat -->
						</div>
					</router-link>
				</li>
				
			</ul>
    </div>
</template>
<script>

export default {
   data() {
	   return {
		   newList:[]
	   }
   },
   created(){
	   this.getdata();
   },
	methods:{
		getdata(){
			this.$http({
				method:'get',
				url:'https://locally.uieee.com/shops'
			}).then(res=>{
				// console.log(res);
				let list=res.data;
				this.newList=list;
			})
		}

	},

}
</script>
<style scoped>

</style>
